<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="http://struts-menu.sf.net/tag" prefix="menu" %>
<%@ taglib uri="http://struts-menu.sf.net/tag-el" prefix="menu-el" %>
<%@ taglib uri="/WEB-INF/tlds/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tlds/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tlds/authz.tld" prefix="authz" %>
<%@ taglib uri="/WEB-INF/tlds/sitemesh-decorator.tld" prefix="decorator"%><?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title><decorator:title
	default="Console de param&eacute;trage des applications annuaires" /></title>
<c:set var="ctx" value="${pageContext.request.contextPath}"
	scope="request" />
<link rel="stylesheet" type="text/css" media="screen"
	href="${ctx}/styles/menu2.css" />
<script type="text/javascript" src="${ctx}/dwr/interface/ConfigSaverDWR.js"></script>
<script type="text/javascript" src="${ctx}/scripts/menu.js"></script>
<script type="text/javascript" src="${ctx}/scripts/prototype.js"></script>
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript">
function saveBeforeLoad(isApplicationModified, id, href){
	if(isApplicationModified!=null && isApplicationModified=="true"){
		if(confirm('<bean:message key="info.confirmSave"/>')){
		// AJAX call
			ConfigSaverDWR.saveApplicationConfigAndLoad(messageAndLoad,id, href);
		}else{
			this.self.location = href;
		}
	}else{
		this.self.location = href;
	}
}		
function saveConBeforeLoad(isConModified, id, href){
	if(isConModified!=null && isConModified=="true"){
		if(confirm('<bean:message key="info.confirmConSave"/>')){
		// AJAX call
			ConfigSaverDWR.saveConnectionConfigAndLoad(messageAndLoad,id, href);
		}else{
			this.self.location = href;
		}
	}else{
		this.self.location = href;
	}
}				
function messageAndLoad(ret) {
	if(ret!=null) {
		alert('<bean:message key="info.saveDone"/>');
		this.self.location = ret;
	} else {
		alert('<bean:message key="info.saveNotDone"/>');
	}
}
</script>
<decorator:head />
</head>
<body>
		<menu:useMenuDisplayer name="ListMenu" repository="nodeList">
		    <%
		    net.sf.navigator.menu.MenuRepository repository = (net.sf.navigator.menu.MenuRepository) session.getAttribute("nodeList");
		    java.util.List menus = repository.getTopMenus();
		    for (java.util.Iterator it = menus.iterator(); it.hasNext();) {
		    	net.sf.navigator.menu.MenuComponent mc = (net.sf.navigator.menu.MenuComponent) it.next();
			%>
			<menu:displayMenu name="<%= mc.getName() %>"/>
			<%		    
		    }		    
		    %>
		</menu:useMenuDisplayer>
<div id="content"><decorator:body /></div>
</body>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/wz_tooltip.js"></script>
</html>